﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterpage/LoginSite.Master" AutoEventWireup="true" CodeBehind="Shop.aspx.cs" Inherits="Shop" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:HiddenField ID="hdnShopID" runat="server" />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0">
 <tr>
            <td align="left">
            ข้อมูลร้านค้า (Shop Information)
            </td>
            <td align="right">
                <asp:Button ID="btnEdit" runat="server" Text="แก้ไขข้อมูลร้านค้า" 
                    onclick="btnEdit_Click" />
            </td>
        </tr>
        <tr>
            <td align="left">
            รหัสร้านค้า :
            </td>
            <td align="left" valign="top">
                <asp:Label ID="lblShopID" runat="server"></asp:Label>
                </td>
        </tr>
        <tr>
            <td align="left">
            ชื่อร้านค้า :
            </td>
            <td align="left" valign="top">
                <asp:Label ID="lblShopName" runat="server"></asp:Label>
                </td>
        </tr>
        <tr>
            <td align="left" valign="top">
            ที่อยู่ :
            </td>
            <td align="left" valign="top">
                <asp:Label ID="lblAddress" runat="server"></asp:Label>
              </td>
        </tr>
        <tr>
            <td align="left">
            Latitude :
            </td>
            <td align="left" valign="top">
                <asp:Label ID="lblLatitude" runat="server"></asp:Label>
        </td>
        </tr>
        <tr>
            <td align="left">
               Longitude :
            </td>
            <td align="left" valign="top">
                <asp:Label ID="lblLongitude" runat="server"></asp:Label>
        </td>
        </tr>
        <tr>
            <td align="left">
                รายละเอียดร้านค้า :
            </td>
            <td align="left" valign="top">
                <asp:Label ID="lblShopDetail" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="left">
            โลโก้ร้านค้า :
            </td>
            <td align="left" valign="top">
            <asp:Image ID="imgShopLogo" Width="120px" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="left">
            Package :
            </td>   
            <td align="left" valign="top">
                <asp:Label ID="lblPackage" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="left">
            ประเภทร้านค้า :
            </td>   
            <td align="left" valign="top">
                <asp:Label ID="lblShopType" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="left">
            รูปภาพร้านค้า :    
            </td>
            <td align="left" valign="top">
                <asp:Image ID="imgShop" Width="120px" runat="server" />
            </td>
        </tr>
</table>
</td>
</tr>
<tr>
<td align="center"> <asp:Label ID="lblMessage" runat="server"></asp:Label></td>
</tr>
<tr>
<td align="center"><br />
<table width="50%" border="0" cellpadding="0" cellspacing="0">
<tr>
    <td align="left">
    ข้อมูลสาขา (Location Information)
    </td>
    <td align="right">
    <asp:Button ID="btnAddOneLocation" runat="server" 
            Text="เพิ่มข้อมูลในกรณีที่ไม่มีสาขา" onclick="btnAddOneLocation_Click" />
    <asp:Button ID="btnAddLocation" runat="server" Text="เพิ่มข้อมูลสาขา" 
        onclick="btnAddLocation_Click" />
    </td>
    </tr>
    <tr>     
    <td align="left" colspan="2">
    <asp:GridView ID="grdLocation" runat="server" AutoGenerateColumns="False" 
        onrowcommand="grdLocation_RowCommand" onrowdatabound="grdLocation_RowDataBound">
        <Columns>
             <asp:TemplateField HeaderText="ลำดับ">
                <ItemTemplate>
                    <asp:Label ID="lblNo" runat="server"></asp:Label>
                    <asp:Label ID="lblID" runat="server" Text='<% #Bind("Location_ID") %>' style="display:none"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="ชื่อร้านหรือสาขา">
                <ItemTemplate>
                    <asp:Label ID="lblLocationName" runat="server" Text='<% #Bind("Location_Name") %>' ></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="ที่อยู่และรายละเอียด">
                <ItemTemplate>
                    <asp:Label ID="lblLocationDetail" runat="server" Text='<% #Bind("Location_Detail") %>' ></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Latitude">
                <ItemTemplate>
                    <asp:Label ID="lblLatitude" runat="server" Text='<% #Bind("Location_Lat") %>' ></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Longitude">
                <ItemTemplate>
                    <asp:Label ID="lblLongitude" runat="server" Text='<% #Bind("Location_Long") %>' ></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Detail">
                <ItemTemplate>
                    <asp:ImageButton ID="btnLocationView" runat="server" ImageUrl="../images/icon/ico559.gif" AlternateText="View" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Edit">
                <ItemTemplate>
                    <asp:ImageButton ID="btnLocationEdit" runat="server" ImageUrl="../images/icon/ico425.gif" AlternateText="Edit" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Delete">
                <ItemTemplate>
                    <asp:ImageButton ID="btnLocationDelete" runat="server" ImageUrl="../images/icon/ico417.gif" AlternateText="Delete" CommandName="Del" CommandArgument='<% #Eval("Location_ID") %>' />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    </td>
    </tr>
    <tr>
    <td align="center" colspan="2">
     <asp:Label ID="lblLocation" runat="server"></asp:Label>
    </td>
    </tr>
    </table>
</td>
</tr>
</table>
</asp:Content>
